﻿using CPPEI.Coolzon.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.Service
{
    /// <summary>
    /// 配置信息同步服务
    /// </summary>
    [ServiceContract]
    public interface ISyncService
    {
        /// <summary>
        /// 获取配置信息的同步计划
        /// </summary>
        /// <param name="solution">方案名称</param>
        /// <param name="localVersion">本地方案版本</param>
        /// <returns></returns>
        [OperationContract]
        SyncSchedule GetSyncSchedule(string solution, string localVersion);

        /// <summary>
        /// 获取文件
        /// </summary>
        /// <param name="solution">方案名称</param>
        /// <param name="fileName">fileName,带文件后缀名</param>
        /// <param name="offset">需要获取的本次文件偏移值</param>
        /// <returns></returns>
        [OperationContract]
        SyncResult SyncFile(string solution, string fileName, long offset);
    }
}
